package com.zlf.demo.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zlf.demo.mapper.GoodsMapper;
import com.zlf.demo.model.Goods;
import com.zlf.demo.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 货物管理信息表 服务实现类
 * </p>
 *
 * @author zhanglongfei
 * @since 2021-01-06
 */
@Service
public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements GoodsService {

    @Autowired
    private GoodsMapper goodsMapper;

    @DS(value = "slave1")
    public List<Goods> listslave() {
        return goodsMapper.selectList(new QueryWrapper<Goods>());
    }

    public List<Goods> listmaster() {
        return goodsMapper.selectList(new QueryWrapper<Goods>());
    }
}
